package com.atguigu.distributed.lock.mapper;

import com.atguigu.distributed.lock.pojo.Stock;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;

/**
 * @author BLADE
 * @description:
 * @data 2024/4/2413:19
 */
public interface StockMapper extends BaseMapper<Stock> {
    @Update("update db_stock set count = count- #{count} where product_code ='1001' and count >= 1")
    int updateStock();
}
